{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "99b6998b",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import sys\n",
    "import numpy as np\n",
    "from matplotlib import pyplot as plt\n",
    "import matplotlib\n",
    "import torch\n",
    "import math\n",
    "import json"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "44d0c79a",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "def CreateImageMeta(img_path,height,width):\n",
    "    '''\n",
    "    创建一个img 元素对象\n",
    "    args:\n",
    "        img_path: 图片的路径\n",
    "        height： 高度\n",
    "        width：宽度\n",
    "    '''\n",
    "    img_str=\"<img src='{}' width='{}px' height='{}px'>\".format(img_path,height,width)\n",
    "    return img_str\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "4ba0143c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"<img src='http://static.runoob.com/images/runoob-logo.png' width='30px' height='30px'>\""
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "CreateImageMeta('http://static.runoob.com/images/runoob-logo.png',30,30)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "425c8c9b",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
